package com.dianping.cat.home.service.client.entity;

import com.dianping.cat.home.service.client.BaseEntity;
import com.dianping.cat.home.service.client.IVisitor;
import java.util.Date;
import java.util.LinkedHashMap;
import java.util.Map;





public class ClientReport
  extends BaseEntity<ClientReport>
{
  private String m_domain;
  private Date m_startTime;
  private Date m_endTime;
/*  19 */   private Map<String, Domain> m_domains = new LinkedHashMap();





  public ClientReport(String domain) { this.m_domain = domain; }




/*  30 */   public void accept(IVisitor visitor) { visitor.visitClientReport(this); }


  public ClientReport addDomain(Domain domain) {
/*  34 */     this.m_domains.put(domain.getId(), domain);
/*  35 */     return this;
  }


  public boolean equals(Object obj) {
/*  40 */     if (obj instanceof ClientReport) {
/*  41 */       ClientReport _o = (ClientReport)obj;

/*  43 */       if (!equals(getDomain(), _o.getDomain())) {
/*  44 */         return false;
      }

/*  47 */       return true;
    }

/*  50 */     return false;
  }


/*  54 */   public Domain findDomain(String id) { return (Domain)this.m_domains.get(id); }


  public Domain findOrCreateDomain(String id) {
/*  58 */     Domain domain = (Domain)this.m_domains.get(id);

/*  60 */     if (domain == null) {
/*  61 */       synchronized (this.m_domains) {
/*  62 */         domain = (Domain)this.m_domains.get(id);

/*  64 */         if (domain == null) {
/*  65 */           domain = new Domain(id);
/*  66 */           this.m_domains.put(id, domain);
        }
      }
    }

/*  71 */     return domain;
  }


/*  75 */   public String getDomain() { return this.m_domain; }



/*  79 */   public Map<String, Domain> getDomains() { return this.m_domains; }



/*  83 */   public Date getEndTime() { return this.m_endTime; }



/*  87 */   public Date getStartTime() { return this.m_startTime; }



  public int hashCode() {
/*  92 */     int hash = 0;

/*  94 */     return hash * 31 + ((this.m_domain == null) ? 0 : this.m_domain.hashCode());
  }




  public void mergeAttributes(ClientReport other) {
/* 101 */     assertAttributeEquals(other, "client-report", "domain", this.m_domain, other.getDomain());

/* 103 */     if (other.getStartTime() != null) {
/* 104 */       this.m_startTime = other.getStartTime();
    }

/* 107 */     if (other.getEndTime() != null) {
/* 108 */       this.m_endTime = other.getEndTime();
    }
  }


/* 113 */   public Domain removeDomain(String id) { return (Domain)this.m_domains.remove(id); }


  public ClientReport setDomain(String domain) {
/* 117 */     this.m_domain = domain;
/* 118 */     return this;
  }

  public ClientReport setEndTime(Date endTime) {
/* 122 */     this.m_endTime = endTime;
/* 123 */     return this;
  }

  public ClientReport setStartTime(Date startTime) {
/* 127 */     this.m_startTime = startTime;
/* 128 */     return this;
  }

  public ClientReport() {}
}


/* Location:              /Users/hanfei/Documents/apache-tomcat-9.0.24/webapps/cat/WEB-INF/classes/!/com/dianping/cat/home/service/client/entity/ClientReport.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       1.0.7
 */